# 对文件进行分组
macro(GROUP_VISUAL_STUDIO_FILES source_files)
    if(MSVC)
        #set(group_cur_dir ${CMAKE_CURRENT_SOURCE_DIR})
        #foreach(group_file ${${source_files}})
        #    message(STATUS ${group_file})
        #    string(REGEX REPLACE ${group_cur_dir}//(.*/) //1 group_fpath ${group_file})
        #    string(REGEX REPLACE "/(.*/)/.*" //1 group_name ${group_fpath})
        #    string(COMPARE EQUAL ${group_fpath} ${group_name} nogroup)
        #    string(REPLACE "/" "//" group_name ${group_name})
        #    if(nogroup)
        #        set(group_name "//")
        #    endif()
        #    message(STATUS ${group_name} ${group_file})
        #    source_group(${group_name} FILES ${group_file})
        #endforeach()
    endif()
endmacro()